<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>分类参数设置</title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'public/css/testa.css'; ?>">
	<link rel="icon" type="image/png" href="<?php echo base_url() . 'public/'; ?>assets/i/favicon.png">
	<link rel="apple-touch-icon-precomposed" href="<?php echo base_url() . 'public/'; ?>assets/i/app-icon72x72@2x.png">
	<link rel="stylesheet" href="<?php echo base_url() . 'public/'; ?>assets/css/amazeui.min.css"/>
	<!-- <link rel="stylesheet" href="<?php echo base_url() . 'public/'; ?>assets/css/admin.css"> -->
	<script type="text/javascript" src="<?php echo base_url() . 'public/'; ?>assets/js/jquery-1.8.3/jquery.js"></script>
	<script src="<?php echo base_url() . 'public/'; ?>assets/js/jquery.min.js"></script>
	<script src="<?php echo base_url() . 'public/'; ?>assets/layer/layer.js"></script>
	<script src="<?php echo base_url() . 'public/'; ?>assets/js/app.js"></script>
</head>
<body>
	<div class="header">
		<div class="attent">
			分类参数设置
		</div>
	</div>
	<div class="admin-biaogelist">
		<div class="listbiaoti am-cf">
			<dl>
				<button type="button" class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus" data-am-modal="{target: '#my-popup'}">添加商品一级分类</button>
			</dl>
			<!-- data-am-modal="{target: '#my-popup'}" 弹出层 ID  弹出层 190行 开始  271行结束 --> 
		</div>
	<div class="am-popup am-popup-inner" id="my-popur">
		<div class="am-popup-hd">
			<h4 class="am-popup-title">添加分类参数</h4>
			<span data-am-modal-close class="am-close">&times;</span>
		</div>
		<div class="an-popup-bd">
			<form class="am-form" method="post" action="<?php echo site_url() . '/Welcome/gentout'; ?>">
				<div class="am-form-group am-cf">
					<div class="zuo">分类名称</div>
					<div class="you">
						<input type="text" class="am-input-sm" name="title" placeholder="请输入分类名">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="zuo">外观值</div>
					<div class="you" style="height: 45px;">
						<input type="text" id="doc-ipt-file-1" name="rivate" placeholder="请输入外观值">
					</div>
				</div>
				<div class="am-form-group am-cf">
					<div class="you" style="margin-left: 11%;">
						<button type="submit" class="am-btn am-btn-secondary am-radius">发布</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="bottom">
		<table id="my" border="1">
			<tr>
				<th>分类名称</th>
				<th>产品外观值</th>
				<th>操作</th>
			</tr>
		</table>
		<table id="myTable">
			<?php foreach ($result as $key => $value) { ?>
			<tr>
				<td><?php echo $value['title']; ?></td>
				<td><?php echo $value['rivate']; ?></td>
				<td><input id="delete" type="button" value="删除" onclick="deleteRow(<?php echo $value['id'];?>);"></td>
			</tr>
			<?php } ?>
		</table>
	</div>
</body>
<script>

function deleteRow(id) {
	document.getElementById("myTable").deleteRow('#delete');
	var url = "<?php echo site_url() . '/Welcome/admin'; ?>";
	var data = {};
	data.id = id;
	$.ajax({
		type: "POST",
		url: url,
		data: data,
		success: function(data) {
			alert('继续删除');
		}
	});
}

$(".am-icon-plus").click(
	function() {
		$(".am-popup").css("display","inline-block")
		$(".am-popup").css("top","-50%")
	}
);



</script>
<script src="<?php echo base_url() . 'public/'; ?>assets/js/amazeui.min.js"></script> 
</html>